< previous page page_916 next page >

Page 916
If you have problems with the script, review the SQLVB01.SQV file for errors. You may also have to review the Visual Basic code to check for program errors. If the script ran without errors, you can check out other aspects of the program, including the Windows menu and resizing the grid forms.
When you are sure that the program is working properly, you can continue with the next section of the chapter.
Creating the SQL-VB5 Object Model Interface
Now you're ready to add an object model wrapper to the SQL-VB5 Interpreter. All you need to do is add a class module to the project, define some methods and properties, and you're all set.
First, add a class module to the project (Project | Add Class Module) and set its Name to Application. Now you're ready to add properties and methods to the class.
Adding Properties to the Object Model
You need two properties: DBName and Script. Listing A.40 shows the Property Let and Property Get code for both items. Be sure to add the Private variables in the general declaration section, too.
Type.gifListing A.40. Adding properties to the Application class.
Option Explicit

Private strScript As String
Private strDBName As String

Public Property Get Script() As Variant
    Script = strScript
End Property

Public Property Let Script(ByVal vNewValue As Variant)
    strScript = vNewValue
End Property

Public Property Get DBName() As Variant
    DBName = strDBName
End Property

 
< previous page page_916 next page >

If you like this book, buy it!